package com.example.thinkpad;

import android.app.Activity;
import android.os.Bundle;

import com.example.thinkpad.adapter.GuideAdapter;
import com.example.thinkpad.payby3.R;

import java.util.ArrayList;

/**
 * Created by ThinkPad on 2017/3/25.
 */
public class GuideActivity extends Activity {

    private CustomViewpager mViewPager;
//    private ViewPager mViewPager;
    private ArrayList<Integer> itemPager = new ArrayList();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.guidelayout);
//        mViewPager = (ViewPager) findViewById(R.id.viewpager);
        mViewPager = (CustomViewpager) findViewById(R.id.viewpager);

        init();

        GuideAdapter adapter = new GuideAdapter(itemPager, this, mViewPager);
        mViewPager.setAdapter(adapter);


//        mViewPager.setPageTransformer(true,new ZoomOutPageTransformer());
//        mViewPager.setPageTransformer(true,new DepthPageTransformer());
    }

    private void init() {
        int guide_1 = R.mipmap.guide_1;
        int guide_2 = R.mipmap.guide_2;
        int guide_3 = R.mipmap.guide_3;
        itemPager.add(guide_1);
        itemPager.add(guide_2);
        itemPager.add(guide_3);
    }
}
